const api = require('./api') //postRequest 无需验证token  PostRequest 需要验证token
// 推荐位
export const position = {
	content: {
		lists(data, fun) {
			return api.postRequest("/api/position.content/lists", data, fun)
		},
		detail(data, fun) {
			return api.postRequest("/api/position.content/detail", data, fun)
		},
	},
}
// 民宿
export const hotel = {
	lists(data, fun) {
		return api.postRequest('/api/hotel/lists', data, fun)
	},
	detail(data, fun) {
		return api.PostRequest('/api/hotel/detail', data, fun)
	},
	rankingList(data, fun) {
		return api.PostRequest('/api/hotel/rankingList', data, fun)
	},
	// 房型
	room: {
		lists(data, fun) {
			return api.postRequest('/api/hotel.room.type/lists', data, fun)
		},
		detail(data, fun) {
			return api.postRequest('/api/hotel.room.type/detail', data, fun)
		},
	},
	// 订单
	order: {
		submit(data, fun) {
			return api.PostRequest('/api/hotel.order/submit', data, fun)
		},
		pay(data, fun) {
			return api.PostRequest('/api/hotel.order/pay', data, fun)
		},
		myList(data, fun) {
			return api.PostRequest('/api/hotel.order/myList', data, fun)
		},
		detail(data, fun) {
			return api.PostRequest('/api/hotel.order/detail', data, fun)
		},
		cancel(data, fun) {
			return api.PostRequest('/api/hotel.order/cancel', data, fun)
		},
		refund(data, fun) {
			return api.PostRequest('/api/hotel.order/refund', data, fun)
		},
	},
	// 评价
	comment: {
		submit(data, fun) {
			return api.postRequest('/api/hotel.comment/submit', data, fun)
		},
		lists(data, fun) {
			return api.postRequest('/api/hotel.comment/lists', data, fun)
		},
		detail(data, fun) {
			return api.postRequest('/api/hotel.comment/detail', data, fun)
		},
		myList(data, fun) {
			return api.postRequest('/api/hotel.comment/myList', data, fun)
		},
		myDetail(data, fun) {
			return api.postRequest('/api/hotel.comment/myDetail', data, fun)
		},
	}
}
export const platform = {
	// 景点
	scenic: {
		lists(data, fun) {
			return api.postRequest('/api/platform.scenic/lists', data, fun)
		},
		detail(data, fun) {
			return api.PostRequest('/api/platform.scenic/detail', data, fun)
		},
		category: {
			lists(data, fun) {
				return api.PostRequest('/api/platform.scenic.category/lists', data, fun)
			},
		}
	},
	// 司机
	driver: {
		lists(data, fun) {
			return api.postRequest('/api/platform.driver/lists', data, fun)
		},
		register(data, fun) {
			return api.postRequest('/api/platform.driver/register', data, fun)
		},
		info(data, fun) {
			return api.PostRequest('/api/platform.driver/info', data, fun)
		},
		detail(data, fun) {
			return api.PostRequest('/api/platform.driver/detail', data, fun)
		},
	},
	// 导游
	guide: {
		lists(data, fun) {
			return api.PostRequest('/api/platform.guide/lists', data, fun)
		},
		detail(data, fun) {
			return api.PostRequest('/api/platform.guide/detail', data, fun)
		},
		orderSubmit(data, fun) {
			return api.PostRequest('/api/platform.guide.order/submit', data, fun)
		},
		orderPay(data, fun) {
			return api.PostRequest('/api/platform.guide.order/pay', data, fun)
		},
		myList(data, fun) {
			return api.PostRequest('/api/platform.guide.order/myList', data, fun)
		},
		orderDetail(data, fun) {
			return api.PostRequest('/api/platform.guide.order/detail', data, fun)
		},
		orderCancel(data, fun) {
			return api.PostRequest('/api/platform.guide.order/cancel', data, fun)
		},
		orderRefund(data, fun) {
			return api.PostRequest('/api/platform.guide.order/refund', data, fun)
		},
	},
	// 反馈
	feedback: {
		submit(data, fun) {
			return api.PostRequest('/api/platform.feedback/submit', data, fun)
		},
		myList(data, fun) {
			return api.PostRequest('/api/platform.feedback/myList', data, fun)
		},
		detail(data, fun) {
			return api.PostRequest('/api/platform.feedback/detail', data, fun)
		},
	},
}
// 商品列表
export const store = {
	product: {
		query(data, fun) {
			return api.postRequest('/api/store.product/lists', data, fun)
		},
		detail(data, fun) {
			return api.PostRequest('/api/store.product/detail', data, fun)
		},
	},
	category: {
		treeList(data, fun) {
			return api.postRequest('/api/store.category/treeList', data, fun)
		},
	},
	cart: {
		add(data, fun) {
			return api.PostRequest('/api/store.cart/add', data, fun)
		},
		myList(data, fun) {
			return api.PostRequest('/api/store.cart/myList', data, fun)
		},
		delete(data, fun) {
			return api.PostRequest('/api/store.cart/delete', data, fun)
		},
		update(data, fun) {
			return api.PostRequest('/api/store.cart/update', data, fun)
		},
	},
	// 评价
	comment: {
		submit(data, fun) {
			return api.PostRequest('/api/store.comment/submit', data, fun)
		},
		lists(data, fun) {
			return api.PostRequest('/api/store.comment/lists', data, fun)
		},
		myList(data, fun) {
			return api.PostRequest('/api/store.comment/myList', data, fun)
		},
		submit(data, fun) {
			return api.PostRequest('/api/store.comment/submit', data, fun)
		},
		detail(data, fun) {
			return api.PostRequest('/api/store.comment/detail', data, fun)
		},
		myDetail(data, fun) {
			return api.PostRequest('/api/store.comment/myDetail', data, fun)
		},
	},
	// 订单
	order: {
		submit(data, fun) {
			return api.PostRequest('/api/store.order/submit', data, fun)
		},
		pay(data, fun) {
			return api.PostRequest('/api/store.order/pay', data, fun)
		},
		myList(data, fun) {
			return api.PostRequest('/api/store.order/myList', data, fun)
		},
		detail(data, fun) {
			return api.PostRequest('/api/store.order/detail', data, fun)
		},
		cancel(data, fun) {
			return api.PostRequest('/api/store.order/cancel', data, fun)
		},
		// 确认收货
		receive(data, fun) {
			return api.PostRequest('/api/store.order/receive', data, fun)
		},
		// 申请退款
		refund(data, fun) {
			return api.PostRequest('/api/store.order/refund', data, fun)
		},
		// 确认下单
		confirm(data, fun) {
			return api.PostRequest('/api/store.order/confirm', data, fun)
		},
	}

}
export const district = {
	treeList(data, fun) {
		return api.postRequest("/api/district/treeList", data, fun)
	}
}
// 地区列表
export const region = {
	query(data, fun) {
		return api.postRequest('/api/region/query', data, fun)
	},
}
// 用户信息
export const user = {
	detail(data, fun) {
		return api.PostRequest('/api/user/detail', data, fun)
	},
	detailS(data, fun) {
		return api.postRequest('/api/user/detail', data, fun)
	},
	checkToken(data, fun) {
		return api.PostRequest('/api/user/checkToken', data, fun)
	},
	// 券
	coupon: {
		myList(data, fun) {
			return api.PostRequest('/api/user.coupon/myList', data, fun)
		},
		usableList(data, fun) {
			return api.PostRequest('/api/user.coupon/usableList', data, fun)
		},
	},
	// 收藏
	collect: {
		submit(data, fun) {
			return api.PostRequest('/api/user.collect/submit', data, fun)
		},
		// 列表
		myList(data, fun) {
			return api.PostRequest('/api/user.collect/myList', data, fun)
		},
	},
	// 地址
	address: {
		// 列表
		myList(data, fun) {
			return api.PostRequest('/api/user.address/myList', data, fun)
		},
		// 详情
		detail(data, fun) {
			return api.PostRequest('/api/user.address/detail', data, fun)
		},
		// 添加
		add(data, fun) {
			return api.PostRequest('/api/user.address/add', data, fun)
		},
		// 修改
		edit(data, fun) {
			return api.PostRequest('/api/user.address/edit', data, fun)
		},
		// 删除
		delete(data, fun) {
			return api.PostRequest('/api/user.address/delete', data, fun)
		},
	}
}
// 微信登陆
export const wxapp = {
	login(data, fun) {
		return api.postRequest('/api/wxapp/login', data, fun)
	},
	templateId(data, fun) {
		return api.postRequest('/api/wxapp/templateId', data, fun)
	},
}
// 民呼我应
export const problem = {
	// 建议类型
	category: {
		query(data, fun) {
			return api.postRequest("/api/problem.category/query", data, fun)
		},
	},
	create(data, fun) {
		return api.PostRequest("/api/problem/create", data, fun)
	},
	query(data, fun) {
		return api.PostRequest("/api/problem/query", data, fun)
	},
	detail(data, fun) {
		return api.PostRequest("/api/problem/detail", data, fun)
	},
	feedback(data, fun) {
		return api.PostRequest("/api/problem/feedback", data, fun)
	},
}
// 美食
export const gourmet = {
	shop: {
		lists(data, fun) {
			return api.postRequest("/api/gourmet.shop/lists", data, fun)
		},
		detail(data, fun) {
			return api.postRequest("/api/gourmet.shop/detail", data, fun)
		},
		rankingList(data, fun) {
			return api.postRequest("/api/gourmet.shop/rankingList", data, fun)
		},
	},
	product: {
		lists(data, fun) {
			return api.PostRequest("/api/gourmet.product/lists", data, fun)
		},
		detail(data, fun) {
			return api.PostRequest("/api/gourmet.product/detail", data, fun)
		},
	},
	category: {
		lists(data, fun) {
			return api.PostRequest("/api/gourmet.category/lists", data, fun)
		},
	},
	order: {
		submit(data, fun) {
			return api.PostRequest("/api/gourmet.order/submit", data, fun)
		},
		pay(data, fun) {
			return api.PostRequest("/api/gourmet.order/pay", data, fun)
		},
		myList(data, fun) {
			return api.PostRequest("/api/gourmet.order/myList", data, fun)
		},
		cancel(data, fun) {
			return api.PostRequest("/api/gourmet.order/cancel", data, fun)
		},
		detail(data, fun) {
			return api.PostRequest("/api/gourmet.order/detail", data, fun)
		},
	},
	comment: {
		submit(data, fun) {
			return api.PostRequest("/api/gourmet.comment/submit", data, fun)
		},
		lists(data, fun) {
			return api.PostRequest("/api/gourmet.comment/lists", data, fun)
		},
		detail(data, fun) {
			return api.PostRequest("/api/gourmet.comment/detail", data, fun)
		},
		myList(data, fun) {
			return api.PostRequest("/api/gourmet.comment/myList", data, fun)
		},
		myDetail(data, fun) {
			return api.PostRequest("/api/gourmet.comment/myDetail", data, fun)
		},
	}
}
// 优惠券
export const marketing = {
	coupon: {
		lists(data, fun) {
			return api.postRequest("/api/marketing.coupon/lists", data, fun)
		},
		receive(data, fun) {
			return api.postRequest("/api/marketing.coupon/receive", data, fun)
		},
	}
}
// 公共
export const common = {
	captcha(data, fun) {
		return api.postRequest("/api/common/captcha", data, fun)
	},
}
// 旅游路线
export const tour = {
	checkCode(data, fun) {
		return api.postRequest("/api/tour/checkCode", data, fun)
	},
	product: {
		lists(data, fun) {
			return api.postRequest("/api/tour.product/lists", data, fun)
		},
		detail(data, fun) {
			return api.postRequest("/api/tour.product/detail", data, fun)
		},
	},
	order: {
		submit(data, fun) {
			return api.postRequest("/api/tour.order/submit", data, fun)
		},
	},
	coupon: {
		myList(data, fun) {
			return api.postRequest("/api/tour.coupon.record/myList", data, fun)
		},
		detail(data, fun) {
			return api.postRequest("/api/tour.coupon.record/detail", data, fun)
		},
		detailS(data, fun) {
			return api.PostRequest2("/api/tour.coupon.record/detail", data, fun)
		},
		// 核销
		verification(data, fun) {
			return api.PostRequest2("/api/tour.coupon.record/verification", data, fun)
		},
		// 核销列表
		verificationList(data, fun) {
			return api.PostRequest2("/api/tour.coupon.record/verificationList", data, fun)
		},
		// 发送核销数据到邮箱
		sendDataToEmail(data, fun) {
			return api.PostRequest2("/api/tour.coupon.record/sendDataToEmail", data, fun)
		},
	},
	merchant: {
		login(data, fun) {
			return api.postRequest("/api/tour.merchant/login", data, fun)
		},
		logout(data, fun) {
			return api.PostRequest2("/api/tour.merchant/logout", data, fun)
		},
		detail(data, fun) {
			return api.PostRequest2("/api/tour.merchant/detail", data, fun)
		},
		loginWxapp(data, fun) {
			return api.postRequest("/api/tour.merchant.wxapp/login", data, fun)
		},
		bindUser(data, fun) {
			return api.PostRequest2("/api/tour.merchant.wxapp/bindUser", data, fun)
		},
		unbindUser(data, fun) {
			return api.PostRequest2("/api/tour.merchant.wxapp/unbindUser", data, fun)
		},
	}
}